//package com.bs.demo.tasks;
//
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.time.LocalDateTime;
//import java.util.HashMap;
//import java.util.LinkedList;
//import java.util.List;
//import java.util.Map;
//
///**
// * @author bingshao
// * @date 2023/2/15
// **/
//@Component
//public class ScheduleTask {
//
//    public static List<String> list = new LinkedList<>();
//
//    public static String cron = "*/5 * * * * ?";
//
//
//    @PostConstruct
//    public void init() {
//        list.add("冰少");
//        list.add("云澈");
//    }
//
//
//    @Scheduled(cron = "*/5 * * * * ?")
//    public void test() throws InterruptedException {
//        System.out.println("ScheduleTask开始执行时间" + LocalDateTime.now());
//        System.out.println(list.get(0));
//        Thread.sleep(5000);
//        System.out.println("ScheduleTask结束时间" + LocalDateTime.now());
//    }
//
////    @Scheduled(cron = "*/6 * * * * ?")
////    public void test2() {
////        System.out.println(list.get(1));
////    }
//}
